"""
i.定义了一个
学生类：
属性:学号，姓名，年龄，性别，身高，体重，成绩，家庭地址，电话号码。
行为：学习（要求参数传入学习的时间），玩游戏（要求参数传入游戏名），编程（要求参数传入写代码的行数），数的求和（要求参数用变长参数来做，返回求和结果）
"""
class Student :
    def __init__(self,id=0,name="",age=0,gender="",high=0,weight=0,score=0,address="",phone_number=""):
        self.name = name
        self.age = age
        self.gender = gender
        self.high = high
        self.weight = weight
        self.score = score
        self.address = address
        self.phone_number = phone_number

    def study(self,time):
        print(f"学习时长:{time}")

    def play_game(self,game):
        print(f"玩的游戏叫做:{game}")

    def code(self,lines):
        print(f"写了代码行数:{lines}")

    def sum_num(self,*num):
        sum=0
        for i in num:
            sum+=i
        print(f"计算后总和为:{sum}")

# li = Student()
# li.code(12)
# li.study(100)
# li.play_game("gu")
# li.sum_num(1,2,3,4)

"""
ii.车类：
属性：车型号，车轮数，车身颜色，车重量，油箱存储大小 。
功能：跑（要求参数传入车的具体功能，比如越野，赛车）
创建：法拉利，宝马，铃木，五菱，拖拉机对象
"""
class Car:
    def __init__(self,type="",wheel=0,color="",weight=0,volume=0):
        self.type = type
        self.wheel = wheel
        self.color = color
        self.weight = weight
        self.volume = volume

    def run(self,fct):
        print(f"{self.type}在:{fct}")

# falali = Car("法拉利",4,"red",2.3,50)
# baoma = Car("宝马",4,"red",2.3,50)
# lingmu = Car("铃木",4,"red",2.3,50)
# wuling = Car("五菱",4,"red",2.3,50)
# tulaji = Car("拖拉机",4,"red",2.3,50)
# falali.run("越野")

"""
iii.笔记本：
属性：型号，待机时间，颜色，重量，cpu型号，内存大小，硬盘大小。  
行为：打游戏（传入游戏的名称）,办公。
"""
class LapTop:
    def __init__(self,type="",time=0,color="",cpu="",memory=0,Storage=0):
        self.type = type
        self.time = time
        self.color = color
        self.cpu = cpu
        self.memory = memory
        self.Storage = Storage

    def play(self,name):
        print(f"玩游戏:{name}")

    def work(self):
        print("办公")

"""
猴子类：
属性：类别，性别，身体颜色，体重。
行为：造火（要求传入造火的材料：比如木棍还是石头），学习事物（要求参数传入学习的具体事物，可以不止学习一种事物）
"""
class monkey:
    def __init__(self,type="",gender="",color="",weight=0):
        self.type = type
        self.gender = gender
        self.color = color
        self.weight = weight

    def fire(self,material):
        print(f"使用{material}生火")
    def study(self,*object):
        items = ""
        for item in object:
            items = items + item
        print(f"学习{items}")

# mok = monkey("泼猴","雄","棕色",15)
# mok.fire("木材")
# mok.study("数学","英语")
